<div class="backtest-row">
	<p class="backtest-row-trade-list"><span>List of trades</span><a class="updown" href="#" onclick="toggleShowTradeList();"></a></p>
	<div id="trade-list">
		<?php foreach ($data['aProfit'] as $key => $profit) { ?>
		<ul class="backtest-data-list">
			<span>
				<?php $beginDate = new DateTime($profit['beginDate'], new DateTimeZone(TIMEZONE)); ?>
				<?php $endDate = new DateTime($profit['endDate'], new DateTimeZone(TIMEZONE)); ?>
				<strong><?php echo $key+1; ?></strong>. 
				From <?php echo $beginDate->format('d-m-Y'); ?> to <?php echo $endDate->format('d-m-Y'); ?></span>
			<?php if($profit['netProfit'] < 0) { ?>
			<li> - Net loss : <?php echo $profit['netProfit']; ?></li>
			<?php } else {?>
			<li> - Net profit : <?php echo $profit['netProfit']; ?></li>
			<?php }?>
			<li> - Profit percentage : <?php echo $profit['profitPercentage']; ?>%</li>
			<!--<li> - Profit per trade : <?php echo $profit['profitPerTrade']; ?></li>-->
			<li> - No. of days in Trade : <?php echo $profit['noOfDayInTrade']; ?></li>
		</ul><br />
		<?php } ?>
	</div>
</div>
<?php if($data['totalProfit'] < 0) { ?>
<p class="backtest-row"><strong>Total loss :</strong> <?php echo $data['totalProfit']; ?></p>
<?php } else {?>
<p class="backtest-row"><strong>Total profit :</strong> <?php echo abs($data['totalProfit']); ?></p>
<?php }?>
<p class="backtest-row"><strong>Max profit :</strong> <?php echo abs($data['maxTotalProfit']); ?></p>
<p class="backtest-row"><strong>Avg. Profit / Trade :</strong> <?php echo abs($data['avgData']['avgProfitPerTrade']); ?></p>
<p class="backtest-row"><strong>Avg date :</strong> <?php echo abs($data['avgData']['avgDate']); ?></p>